package com.appwoo.txtws.activity;

import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.EditText;
import com.appwoo.txtws.app.AppActivity;
import java.util.Timer;
import java.util.TimerTask;

public class EditTextActivity extends AppActivity
{
  public static final String NAME_INTENT = "content";
  public static final String NAME_INTENT_INDEX = "index";
  public static final String NAME_INTENT_PRIMEVAL_CONETNT = "primeval";
  private int index;
  private Button mBtnComplete;
  private EditText mEditContent;
  private View.OnClickListener onBtnCompleteClickListener = new View.OnClickListener()
  {
    public void onClick(View paramAnonymousView)
    {
      String str = EditTextActivity.this.mEditContent.getText().toString();
      Intent localIntent = new Intent();
      localIntent.putExtra("content", str);
      localIntent.putExtra("index", EditTextActivity.this.index);
      localIntent.putExtra("primeval", EditTextActivity.this.primevalContent);
      EditTextActivity.this.setResult(-1, localIntent);
      EditTextActivity.this.finish();
    }
  };
  private String primevalContent;

  private void findView()
  {
    this.index = getIntent().getIntExtra("index", -1);
    this.primevalContent = getIntent().getStringExtra("primeval");
    this.mEditContent = ((EditText)findViewById(2131493102));
    this.mBtnComplete = ((Button)findViewById(2131493103));
  }

  private void setView()
  {
    this.mBtnComplete.setOnClickListener(this.onBtnCompleteClickListener);
    if ((this.primevalContent != null) && (!"".equals(this.primevalContent)))
      this.mEditContent.setText(this.primevalContent);
  }

  public void backKeyCallBack()
  {
    finish();
  }

  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setContentView(2130903098);
    findView();
    setView();
  }

  protected void onDestroy()
  {
    ((InputMethodManager)getSystemService("input_method")).toggleSoftInput(1, 2);
    super.onDestroy();
  }

  protected void onResume()
  {
    super.onResume();
    this.mEditContent.requestFocus();
    new Timer().schedule(new TimerTask()
    {
      public void run()
      {
        InputMethodManager localInputMethodManager = (InputMethodManager)EditTextActivity.this.getSystemService("input_method");
        localInputMethodManager.showSoftInput(EditTextActivity.this.mEditContent, 2);
        localInputMethodManager.toggleSoftInput(2, 1);
      }
    }
    , 300L);
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.activity.EditTextActivity
 * JD-Core Version:    0.6.2
 */